<#include "copyright.ftl"/>
package ${basePackage}.${moduleName}.mapper${submoduleName!?replace("\\", ".")};

import java.util.List;
import org.apache.ibatis.annotations.Param;
import com.shfft.common.page.Page;
import ${basePackage}.${moduleName}.domain${submoduleName!?replace("\\", ".")}.${table.tableAlias};
<#if (table.hasDateColumn)>
import java.util.Date;
</#if>
<#if (table.hasBigDecimalColumn)>
import java.math.BigDecimal;
</#if>

/**
 * <p>Mapper 映射 </p>
 * <p>Table: ${table.tableName} --> ${table.tableAlias} </p>
 *
 * @since ${.now}
 */
public interface ${table.tableAlias}Mapper {

	/**
	 * 增加
	 * @param bean
	 */
	public void insert(${table.tableAlias} bean );
	
	/**
	 * 修改
	 * @param bean
	 */
	public void update(${table.tableAlias} bean );
	
	/**
	 * 主键删除
	 * @param 
	 */
	public void delete(<#list table.primaryKeys as key> @Param("${key.javaProperty}") ${key.javaType} ${key.javaProperty} </#list>);
	
	/**
	 * 根据主键查询单条
	 * @param 
	 * @return
	 */
	public ${table.tableAlias} findByPk(<#list table.primaryKeys as key> @Param("${key.javaProperty}") ${key.javaType} ${key.javaProperty} </#list>);

	/**
	 * 根据条件查询list
	 * @return
	 */
	public List<${table.tableAlias} > getList(${table.tableAlias} bean );
	
	/**
	 * 根据条件查询page
	 * @param bean
	 * @return
	 */
	public Page<${table.tableAlias} > getPage(@Param(Page.PAGE_KEY) Page<${table.tableAlias}> page, @Param("bean") ${table.tableAlias} bean );
}